package cn.itcast.netty.c4;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.nio.charset.StandardCharsets;
import java.util.UUID;

public class Client {

    public static void main(String[] args) throws Exception {

        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress("localhost", 8080));
        //ByteBuffer hello = StandardCharsets.UTF_8.encode("hello\nworld\n");
        sc.write(StandardCharsets.UTF_8.encode("1111111111111\naaaaaaaaa"));
        sc.write(StandardCharsets.UTF_8.encode("0123456789abcdef3333\n"));

        System.in.read();

    }
}
